package com.argticling.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

import com.argticling.service.DublinCoreService;

@Controller
public class DublinCoreController extends MultiActionController {

	@Autowired
	private DublinCoreService dublinCoreService;

	@RequestMapping(value = "/article/dublincore/retrieveByAuthor/{authorId}", method = RequestMethod.GET)
	public ModelAndView retrieveArticleByAuthor(HttpServletRequest request,
			@PathVariable String authorId) {
		dublinCoreService.getByAuthor(authorId);
		ModelAndView mav = new ModelAndView("");
		return mav;
	}

	@RequestMapping(value = "/article/dublincore/retrieveByDate/{date}", method = RequestMethod.GET)
	public ModelAndView retrieveArticleByDate(HttpServletRequest request,
			@PathVariable String date) {
		dublinCoreService.getByDate(date);
		ModelAndView mav = new ModelAndView("");
		return mav;
	}

	@RequestMapping(value = "/article/dublincore/retrieveBySection/{section}", method = RequestMethod.GET)
	public ModelAndView retrieveArticleBySection(HttpServletRequest request,
			@PathVariable String section) {
		dublinCoreService.getBySection(section);
		ModelAndView mav = new ModelAndView("");
		return mav;
	}

}
